#include <bits/stdc++.h>

using namespace std;

class Solution
{
public:
    bool halvesAreAlike(string s)
    {
        unordered_map<char, int> m;
        m['a'] = 0, m['e'] = 0, m['i'] = 0, m['o'] = 0, m['u'] = 0;
        m['A'] = 0, m['E'] = 0, m['O'] = 0, m['U'] = 0;
        int count1 = 0;
        int count2 = 0;
        for (int i = 0; i < s.size() / 2; ++i)
        {
            if (m.find(s[i]) != m.end())
            {
                ++count1;
            }
        }
        for (int i = s.size() / 2; i < s.size(); ++i)
        {
            if (m.find(s[i]) != m.end())
            {
                ++count2;
            }
        }
        if (count1 != count2)
        {
            return false;
        }
        return true;
    }
};